var express = require("express");
var router = express.Router();
const UserQuesController = require("../controller/UserQuesController");

//挂载路由

router
  .route("/")
  .patch(UserQuesController.updateUserQues)
  .post(UserQuesController.addUserQues)
  .get(UserQuesController.getUserQues)
  .delete(UserQuesController.deleteUserQues);
router.route("/bygroup/:id").get(UserQuesController.getUserQuesByGroupId);
router
  .route("/bygrouppage/:id")
  .get(UserQuesController.getUserQuesByGroupIdPage);
router.route("/byuser/:id").get(UserQuesController.getUserQuesByUserId);
router.route("/byuserpage/:id").get(UserQuesController.getUserQuesByUserIdPage);

router.route("/exceldata").get(UserQuesController.getExcelData);

router.route("/pageques").get(UserQuesController.getUserQuesPage);

router.route("/:id").get(UserQuesController.getUserQuesById);

router.route("/generateexcel/:id").get(UserQuesController.generateExcelData);

module.exports = router;
